package org.song.service.impl;

import org.song.mapper.ViewMapper;
import org.song.model.dto.ViewDto;
import org.song.model.vo.View;
import org.song.service.ViewService;
import org.song.service.impl.common.AbstractBaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ViewServiceImpl extends AbstractBaseServiceImpl implements ViewService {

    @Autowired( required = true )
    @Qualifier( value = "viewMapper")
    private ViewMapper viewMapper;

    @Override
    public List<View> listView( @NonNull ViewDto viewDto) {
        return viewMapper.listView(viewDto);
    }
    

    @Override
    public int deleteView( @NonNull View view) {
        return viewMapper.deleteView(view);
    }

    @Override
    public int insertView( @NonNull View view) {
        return viewMapper.insertView(view);
    }

    @Override
    public int updateView( @NonNull View view) {
        return viewMapper.updateView(view);
    }
    
}
